package com.tanhua.model.vo;

import com.tanhua.model.db.UserInfo;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Friends {

    private Long id;
    private String avatar;//头像
    private String nickname;//昵称
    private String gender;//性别 man woman
    private Long age;//年龄
    private String city;//城市
    private String education;//学历
    private Long marriage;//婚姻状态（0未婚，1已婚）
    private Long matchRate;//匹配度
    private Boolean alreadyLove;//是否喜欢ta


    public static Friends init(UserInfo userInfo){
        Friends friends = new Friends();
        friends.setId(userInfo.getId());
        friends.setAvatar(userInfo.getAvatar());
        friends.setCity(userInfo.getCity());
        friends.setGender(userInfo.getGender());
        friends.setMatchRate(89l);
        friends.setAlreadyLove(true);
        friends.setAge(userInfo.getAge().longValue());
        friends.setEducation(userInfo.getEducation());
        friends.setMarriage(userInfo.getMarriage().longValue());
        friends.setNickname(userInfo.getNickname());
        return friends;
    }
}
